<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Deloitte Branding</title>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/slider.js"></script>

<script type="text/javascript">
	$(document).ready(function(){
		 var sServiceUrl = "http://192.168.64.89:8080/deloittebranding/jersey/getslides";
		 $.ajaxSetup({contentType: "application/json",crossDomain: true});
		 $.post(sServiceUrl,null,postResult,"json");
		
	});
	
	function playVideo(videoIns)
	{
		//videoIns.play();
	}
	
	function postResult(result)	{
		var content = "";
		var slides = result.slide;
		if(slides != null)
		{
			$.each(slides, function (index){
				var slideData = slides[index];
				if(slideData != null){
					var slidePath = "http://192.168.64.89:8080/branding/"+slideData.filePath;
					var slideContent = "";
					if(slideData.flagImage == true || slideData.flagImage == "true"){
						slideContent = "<li><img src='"+slidePath+"' alt='"+slideData.filePath+"'  width='100%' height='100%' /></li>";
					}
					else{
						if(slideData.flagVideo == true || slideData.flagVideo == "true"){
							slideContent = "<li><video  width='100%' height='100%' controls='controls' autobuffer click='playVideo(this)'><source src='"+slidePath+"' ></source>Your browser does not support the video tag.</video></li>";
						}
					}
					content+=slideContent;
				}
			});	
		}
		$("#allSlideContent").empty().append( content );
		
		//Apply sliding
		$("#slider").easySlider({
			firstShow:false,
			lastShow:false,
			firstText:'',
			lastText:'',
			numericprevnext:true,
			speed:1
		});
	}
		
</script>

	
<link href="css/screen.css" rel="stylesheet" type="text/css"	media="screen" />

</head>
<body>

	
	
	<div id="container">

		<div id="header">
			<div class="tblrow">
				<div class="tblcelllogo">
					<img src="images/deloitte.jpg" title="Deloitte Consulting LLP"
						width="100%" />
				</div>
				<div class="tblcelltitle">
					
				</div>
				<div dir="rtl" align="right">
					<a id="home" href="./" title="Home">Home</a>
				</div>
			</div>


		</div>

		
			<div id="slider">
				<ul id="allSlideContent">
					
				</ul>
			</div>
		</div>
		


</body>
